The Decompression Record Structure
The decompression record structure contains information needed for decompressing a frame.
struct ImageSubCodecDecompressRecord
{
Ptr baseAddr; /* base address of destination pixel map */
long rowBytes; /* bytes in each row */
Ptr codecData; /* pointer to compressed data */
ICMProgressProcRecord progressProcRecord; /* progress function
structure */
ICMDataProcRecord dataProcRecord; /* data-loading function
structure */
void *userDecompressRecord; /* pointer to storage for result */
};
typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
Field descriptions
-
baseAddr
-
The address of the destination pixel map, which includes adjustment for the offset. Note that if the bit depth of the pixel map is less than 8, your image decompressor component must adjust for the bit offset.
-
rowBytes
-
The offset in bytes from one row of the destination pixel map to the next. The value of the
rowBytes
field must be less than $4000.
-
codecData
-
A pointer to the data to be decompressed.
-
progressProcRecord
-
A structure that specifies a progress function. This function reports on the progress of a decompression operation. For more information about progress functions, see the "Image Compression Manager"chapter in
Inside Macintosh: QuickTime.
-
Here is the definition of the structure:
-
struct ProgressProcRecord
{
ProgressProcPtr progressProc; /* ptr to progress function */
long progressRefCon; /* reference constant used by function */
};
typedef struct ProgressProcRecord ProgressProcRecord;
-
If there is no progress function, the Image Compression Manager sets the
progressProc
field in this structure to
nil
.
-
dataProcRecord
-
A structure that specifies a data-loading function. If the data to be decompressed is not all in memory, your component can call this function to load more data. For more information about data-loading functions, see the "Image Compression Manager"chapter in
Inside Macintosh: QuickTime.
-
Here is the definition of the structure:
-
struct DataProcRecord
{
DataProcPtr dataProc; /* pointer to data-loading function */
long dataRefCon; /* reference constant used by function */
};
typedef struct DataProcRecord DataProcRecord;
-
If there is no data-loading function, the Image Compression Manager sets the
dataProc
field in the
DataProcRecord
structure to
nil
, and the entire image must be in memory at the location specified by the
codecData
field of the
ImageSubCodecDecompressRecord
structure.
-
userDecompressRecord
-
A pointer to storage for the decompression operation. The storage is allocated by the base image decompressor after it calls the
ImageCodecInitialize
function. The size of the storage is determined by the
decompressRecordSize
field of the
ImageSubCodecDecompressCapabilities
structure that is returned by the
ImageCodecInitialize
function.
-
Your image decompressor component should use this storage to store any additional information needed about the frame in order to decompress it.
© 1999 Apple Computer, Inc.| Previous | Chapter Contents | Chapter Top | Next |